package com.example.hwIoC.service.impl;

import com.example.hwIoC.dao.UserDao;
import com.example.hwIoC.domain.SysUser;
import com.example.hwIoC.service.UserService;

public class UserServiceImpl implements UserService {


    //引用类型
    private UserDao userDao=null;

    //使用set注入，需要set方法


    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void addUser(SysUser user) {
        userDao.insertUser(user);
    }
}
